]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
search: Cancel search provider operations on clear
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Thu, 23 Aug 2018 16:14:38 +0000 (18:14 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 3 Sep 2018 23:00:52 +0000 (01:00 +0200)
Ensure that the search provider operations (just getResultMetas requests
in the current implementation) in progress are properly cancelled when we
clear the UI, otherwise returned results might still be added when not
needed.

This is triggered for each provider by the SearchResults reset.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/205

js/ui/search.js

index 1fb54b4c99c4e4f93daf3f6de06e81c8dd41ccb9..804be9593902206b1e9c8fc04a0e46f4281ab893 100644 (file)
@@ -192,6 +192,7 @@ var SearchResultsBase = new Lang.Class({
     },
 
     clear() {
+        this._cancellable.cancel();
         for (let resultId in this._resultDisplays)
             this._resultDisplays[resultId].actor.destroy();
         this._resultDisplays = {};